﻿<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>jQuery formValidator表单验证插件 -- by:猫冬，email:wzmaodong@126.com</title>

    <link type="text/css" rel="stylesheet" href="/css/jqformvalidator/validatorAuto.css"/>
    <script src="/js/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="/js/lib/formValidator-4.0.1.min.js" type="text/javascript" charset="UTF-8"></script>

    <script type="text/javascript">
        $(function () {
            $.formValidator.initConfig({formID:"form1", autoTip:true, onError:function (msg) {
                alert(msg)
            }, inIframe:false});
            $("#us").formValidator({onShow:"请输入用户名,只有输入\"maodong\"才是对的", onFocus:"用户名至少6个字符,最多10个字符", onCorrect:"该用户名可以注册"}).inputValidator({min:6, max:10, onError:"你输入的用户名非法,请确认"}).regexValidator({regExp:"username", dataType:"enum", onError:"用户名格式不正确"})
            $.formValidator.reloadAutoTip();
        });

    </script>
</head>

<body>
<h3>jQuery formValidator表单验证插件示例</h3>

<form action="" method="post" name="form1" id="form1">

    <table border="0px" style="font-size:12px" width="630px">
        <tr>
            <td align="right">用户名:</td>
            <td><input type="text" id="us" name="us" style="width:120px" value="maodong"/></td>
        </tr>
    </table>
</form>
</body>
</html>